package com.miguo.app;

import android.os.Process;
import android.text.TextUtils;

import com.miguo.framework.app.CommonApplication;
import com.miguo.framework.utils.Log;
import com.mrper.util.ApkUtil;

public class AppApplication extends CommonApplication {

    @Override
    public void onCreate() {
        super.onCreate();
        Log.DEBUG = AppConfig.DEBUG;
        //云测 上线前上传测试使用
        //TestinAgent.init(this, "789cde5e3acf50e79c5d808b0f093ff9");
        //TestinAgent.setLocalDebug(true);
        //通过判断进程名称，保证以下函数只执行一次
        String processName = ApkUtil.getProcessName(this, Process.myPid());
        if(!TextUtils.isEmpty(processName) && processName.equals(getPackageName()))
            AppContext.init(getApplicationContext()); //初始化数据
    }

}